package com.henrybit.action;

import com.henrybit.service.SpeakService;
import com.henrybit.service.WorkService;

public class LoginAction {
	//说话服务
	private SpeakService speakService;
	//行动服务
	private WorkService workService;
	
	public String login() {
		StringBuffer result = new StringBuffer("");
		//动作
		try {
			String speak = speakService.speakSomething();
			result.append("1.speak");
			result.append("\n");
			result.append(speak);
			result.append("\n");
		} catch (Exception e) {
			e.printStackTrace();
		}
		
		//行动
		try {
			String work = workService.dosomething();
			result.append("1.work");
			result.append("\n");
			result.append(work);
			result.append("\n");
		} catch (Exception e) {
			e.printStackTrace();
		}
		
		return result.toString();
	}
	
	public SpeakService getSpeakService() {
		return speakService;
	}
	public void setSpeakService(SpeakService speakService) {
		this.speakService = speakService;
	}
	public WorkService getWorkService() {
		return workService;
	}
	public void setWorkService(WorkService workService) {
		this.workService = workService;
	}
}
